import request from '@/utils/request'

/**
 * 查询可派工的工序工单任务的工序集合
 * @param data
 */
export function queryCouldDispatchProcess(data) {
  return request({
    url: `/md/operationOrder/queryCanDispatchOperation`,
    method: 'post',
    data
  })
}
// 查询所有下达的工序工单
export function queryProcessOrder(data) {
  return request({
    url: `/md/operationOrder/queryOperationOrder`,
    method: 'post',
    data
  })
}
// 查询所有需要派工的的工序工单
export function query(data) {
  return request({
    url: `/md/operationOrder/needDispatchOperationOrder`,
    method: 'post',
    data
  })
}

// 点击派工根据工序Bo和工序工单号查询确认派工列表
export function queryConfirmList(data) {
  return request({
    // baseURL:'',
    // url: `http://localhost:19004/dispatch/okDispatchList`,
    url: `/md/dispatch/okDispatchList`,
    method: 'post',
    data
  })
}

// 点击派工根据工序Bo和工序工单号查询确认派工列表(批量)
export function queryConfirmLists(data) {
  return request({
    // baseURL:'',
    // url: `http://localhost:19004/dispatch/okDispatchLists`,
    url: '/md/dispatch/okDispatchLists',
    method: 'post',
    data
  })
}

export function confirmDispatch(data) {
  return request({
    // baseURL:'',
    // url: `http://localhost:19004/dispatch/okDispatch`,
    url: `/md/dispatch/okDispatch`,
    method: 'post',
    data
  })
}

export function confirmDispatchs(data) {
  return request({
    // baseURL:'',
    // url: `http://localhost:19004/dispatch/okDispatchs`,
    url: `/md/dispatch/okDispatchs`,
    method: 'post',
    data
  })
}

// 根据改派的数量更新数据
export function comfirmOkDispatch(data) {
  return request({
    url: `/md/dispatch/editDispatch`,
    method: 'post',
    data
  })
}
